package day10.Enum2;

/**
 * @Auther:小陈的Java
 * 使用enum定义枚举
 */
enum Grade {
    /*A(),B(),C(); 全写模式*/
    A,B,C; //简写模式
}
public class Student {
    private String name;
    private Grade grade;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Grade getGrade() {
        return grade;
    }
    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    @Override
    public String toString() {
        return "Student [name=" + name + ", grade=" + grade + "]";
    }
    public static void main(String[] args) {
        Student student = new Student();
        student.setGrade(Grade.A);
        student.setName("安其拉");
        System.out.println(student);
    }
}
